import request from '@/utils/request'

export function fetchList(query) {
    return request({
      url: '/analysis/site-statistics',
      method: 'get',
      params: query
    })
  }


export function delManger(manger_id) {
  return request({
    url: '/customer/delManger/' + manger_id,
    method: 'get'
  })
}

export function delCustomer(customer_id) {
  return request({
    url: '/customer/delCustomer/' + customer_id,
    method: 'get'
  })
}

export function fetchcustomer(id) {
  return request({
    url: '/customer/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/customer/pv',
    method: 'get',
    params: { pv }
  })
}

export function createcustomer(data) {
  return request({
    url: '/customer/create',
    method: 'post',
    data
  })
}

export function updatecustomer(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data
  })
}

export function getAllCustomer() {
  return request({
    url: '/customer/getAll',
    method: 'post'
  })
}

export function getAllTags() {
  return request({
    url: '/customer/getAllTags',
    method: 'get'
  })
}

export function deletetag(tag_id) {
  return request({
    url: '/customer/deleteTag/' + tag_id,
    method: 'get'
  })
}

export function customerSync(data) {
  return request({
    url: '/sync/customer',
    method: 'post',
    data
  })
}

export function getAllRemarks() {
  return request({
    url: '/customer/getAllRemarks',
    method: 'get'
  })
}
